<?php
include "includes/global.php";
$lang=READ_SESSION("LANG");

$country_id=intval($_GET['cid']);
$tab=formatData($_GET['tab']);
$type=formatData($_GET['type']);

/////////////////////////

switch ($type) {
	case 'travelstyle':
		// ++ combox travelstyle
		$sql_travelstyle="SELECT t.travelstyle_id, t.travelstyle_name FROM ".pre_table."travelstyle t, ".pre_table."country_travelstyle ct
						WHERE t.travelstyle_id=ct.travelstyle_id AND ct.country_id='".$country_id."' AND t.lang='".$lang."'";
		$rs_travelstyle=execSQL($sql_travelstyle);
		$cbo_travelstyle.="<select name='".$type.'_'.$tab."'>";
		while ($rows = mysql_fetch_array($rs_travelstyle)){
			$cbo_travelstyle.= '<option value="'.$rows['travelstyle_id'].'">'.$space.$rows['travelstyle_name'].'</option>';
		}
		$cbo_travelstyle.="</select>";
		for($i=0; $i < sizeof($arr_tree); $i++){
			$cbo_travelstyle =str_replace("value=\"".$arr_tree[$i]."\"","value=\"".$arr_tree[$i]."\" selected",$cbo_travelstyle);
		}
		// -- combox travelstyle
		
		echo $cbo_travelstyle;
		
		break;
		
	case 'city':
	
		// ++ combox city
		$sql_city="SELECT c.city_id, c.city_name FROM ".pre_table."city c
						WHERE c.country_id='".$country_id."' AND c.lang='".$lang."'";
		$rs_city=execSQL($sql_city);
		$cbo_city.="<select name='".$type.'_'.$tab."'>";
		while ($rows = mysql_fetch_array($rs_city)){
			$cbo_city.= '<option value="'.$rows['city_id'].'">'.$space.$rows['city_name'].'</option>';
		}
		$cbo_city.="</select>";
		
		$cbo_city =str_replace("value=\"".$city_id."\"","value=\"".$city_id."\" selected",$cbo_city);
		
		// -- combox city
		
		echo $cbo_city;
		
		break;
}




?>